''' NavSquare with Functions and Parameters Functions with Parameters Lesson Sample Solution. Function calls and arguments may be different. ''' from botcore import * from time import sleep motors.enable(True) def go_straight(speed, delay): motors.run(LEFT, speed) motors.run(RIGHT, speed) sleep(delay) def turn_90(speed, delay): motors.run(LEFT, speed) motors.run(RIGHT, -speed) sleep(delay) # -- Main Program -- # first side go_straight(30, 2.0) turn_90(20, 0.72) # second side go_straight(60, 1.0) turn_90(30, 1.0) # third side go_straight(30, 2.0) turn_90(20, 0.72) # fourth side go_straight(60, 1.0) turn_90(40, 0.60)